Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-schema-resolver

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-resolver

Resolve all your $refs

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
462K
increased by33.16%
Maintainers
1
Weekly downloads
 
Created

What is json-schema-resolver?

The json-schema-resolver npm package is designed to resolve JSON schema references, allowing you to dereference $ref pointers within your JSON schemas. This is particularly useful for validating complex JSON structures that reference other schemas.

What are json-schema-resolver's main functionalities?

Resolving JSON Schema References

This feature allows you to resolve $ref pointers within a JSON schema. The code sample demonstrates how to use the json-schema-resolver package to dereference a schema that includes a reference to another schema.

const resolver = require('json-schema-resolver');
const schema = {
  "$id": "http://example.com/root.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "name": {
      "$ref": "http://example.com/name.json"
    }
  }
};
const resolvedSchema = resolver.resolve(schema);
console.log(JSON.stringify(resolvedSchema, null, 2));

Other packages similar to json-schema-resolver

Keywords

FAQs

Package last updated on 30 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc